<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
  <button >点击获取数据</button>
  <script>
  new Promise(((resolve, reject) => {
    setTimeout(()=>{
      resolve(1111)
    },1000)
  }))
  .then(res=>{
    console.log(res)
  })
  </script>
</body>
</html>